class Solution {
public:
    bool isPossibleToSplit(vector<int>& nums) {
        int hash[101];
        for(int &x : nums)
            hash[x]++;
        for(int i = 0; i < 101; i++)
            if(hash[i] > 2)
                return false;
        return true;
    }
};